task_path = ../task/
oj_path = ../oj/
utility_path = ../utility/
proxy_path = ../proxy/
handler_path = ../handler/
parser_path = ../parser/
handler_poll_path = ../handler_poll/
html_parser_path = ../html_parser/

CFLAGS = -I$(utility_path) -I$(oj_path) -I$(handler_path) -I$(task_path) -I$(html_parser_path)
LIBS =  -lcurl -lpthread -lrt -lpython2.7

test: test.o poj_handler.o poj.o gvj.o poj_parser.o
	g++ test.o poj_handler.o poj.o gvj.o poj_parser.o -o test $(CFLAGS) $(LIBS)
	make clean

gvj.o: $(utility_path)gvj.cpp
	g++ -c $(utility_path)gvj.cpp -o gvj.o $(CFLAGS)

test.o: test.cpp
	g++ -c test.cpp -o test.o $(CFLAGS) $(LIBS)

poj_parser.o: $(html_parser_path)poj_parser.cpp
	g++ -c $(html_parser_path)poj_parser.cpp -o poj_parser.o $(CFLAGS)
 

poj_handler.o: $(handler_path)poj_handler.cpp
	g++ -c $(handler_path)poj_handler.cpp -o poj_handler.o $(CFLAGS) $(LIBS)

poj.o: $(oj_path)poj.cpp
	g++ -c $(oj_path)poj.cpp -o poj.o $(CFLAGS) $(LIBS)
 
clean:
	rm -v *.o
